The present invention relates to a technique for detecting a defect in a recording medium, and more particularly relates to a technique for detecting a defect existing in a relatively narrow range of a recording medium.
A defect in a recording medium such as, for example, a tape medium may eventually lead to loss of data. Thus, it is desirable to quickly detect the defect in order to give a user an opportunity to back up the data and to stop use of the tape medium in which the defect is found.
As a conventional technique for detecting a defect in a recording medium, there has been known a first method implemented in a tape recording apparatus that includes a data write unit which rewrites a data unit onto a tape medium when an error is detected in writing of the data unit. In the first method, the number of writes of data units is counted for each of data sets containing multiple data units, and then a tape medium is determined as having a defect if blocks containing the data sets each having a larger number of writes than a predetermined number are continuously arranged along a short-side direction of the tape medium (see Japanese Patent Application Laid-open Publication No. 2004-355748, pages 10 and 11).
Japanese Patent Application Laid-open Publication No. 2004-355748 also discloses a second method implemented in the tape recording apparatus described above. In the second method, the number of writes of data units is counted for each of data sets containing multiple data units. Then, when the number of writes of a certain data set reaches a predetermined number, the certain data set is written into an area different from an original area into which the certain data set is attempted to be written. In addition, the original area is determined as having a defect if the number of writes of the certain data set in the different area does not reach the predetermined number (see Japanese Patent Application Laid-open Publication No. 2004-355748, pages 10 and 11).
As another conventional technique for detecting a defect in a recording medium, there has also been known a method for determining quality of an information recording medium according to an error distribution. More precisely, the information recording medium contains multiple information recording tracks made by recording multiple packet data in a predetermined recording method, and the packet data are each formed of a combination of unit length data and error correction codes added thereto. In this method, when the packet data are reproduced from the information recording medium, the number of errors in each of the packet data is detected by use of the error correction code in one or more information recording tracks. Then, an error distribution is detected with the number of packet data having errors detected therein set on a vertical axis and with the number of errors detected in each packet data set on a horizontal axis. Thus, the quality of the information recording medium is determined by use of this error distribution. (see Japanese Patent Application Laid-open Publication No. Hei 9 (1997)-147501).
Meanwhile, in the above first method disclosed in Japanese Patent Application Laid-open Publication No. 2004-355748, the tape medium is determined as having a defect under the condition that the blocks containing the data sets each having a larger number of writes than the predetermined number, are continuously arranged along the short-side direction of the tape medium. Thus, in the first method described above, a defect existing in a relatively narrow range of the tape medium is overlooked since the defect does not meet the above condition.
On the other hand, in the above second method disclosed in Japanese Patent Application Laid-open Publication No. 2004-355748, the defect in the tape medium does not use the condition that the blocks containing the data sets each having a larger number of writes than the predetermined number, are continuously arranged. Thus, a defect existing in a relatively narrow range of the tape medium can be detected.
However, in the second method, when the number of writes reaches the predetermined number, the certain data set is written in the area different from the original area into which the data set has been attempted to be written, and it is determined which one of the tape medium and the data write unit has a defect, on the basis of whether or not the number of writes of the certain data set in the different area reaches the predetermined number. Thus, in the second method, what kind of a value is to be set as the predetermined number becomes a key to correct defect detection.
However, a drive usually deteriorates with its use and a rewrite attributable to deterioration of the drive may occur. Thus, when the predetermined number is set to be a fixed value, there eventually arises a situation in which the deterioration of the drive increases the number of rewrites of all the data sets up to the number close to the predetermined number even within a range of the predetermined number. In such a situation, the number of writes of a certain data set happens to exceed the predetermined number in a certain area, while the number of writes of the certain data set is less than the predetermined number in another area. Accordingly, the tape medium may be erroneously determined as having a defect. Thus, it is desirable to dynamically set the predetermined number according to the deterioration of the drive with its use. However, for the dynamic setting, a new mechanism for determining a level of deterioration of the drive is required.
Moreover, the technique disclosed in Japanese Patent Application Laid-open Publication No. Hei 9 (1997)-147501 determines whether or not there are smudges, flaws and the like on the surface of an optical card, or determines whether or not there are scratches or stains that cannot be easily removed on the surface of the optical card, on the basis of a degree of concentration in the distribution relative to the vicinity of the number of specific errors in the error distribution. In this error distribution, the number of packet data having errors detected therein is set on the vertical axis, while the number of errors detected in each packet data is set on the horizontal axis. However, in the case where there is a small defect in a relatively short or narrow range of the optical card, only a small number of packet data is detected as having an error due to the small defect. Thus, the small defect is not shown as significant data on the error distribution described above. Consequently, it is not suitable to use the error distribution described above for detecting a defect in a relatively short or narrow range of the tape medium.
Furthermore, in Japanese Patent Application Laid-open Publication No. Hei 9 (1997)-147501, a possibility of an error due to failure of the drive is not taken into consideration. Thus, the method for determining the quality of the information recording medium by use of the technique disclosed in Japanese Patent Application Laid-open Publication No. Hei 9 (1997)-147501 is a method effective when the drive is guaranteed to have no problems at all.